import pandas as pd
## 将每次新版本来的topic数据放在txt文件中，经过去重导入TopicInfo.xlsx ##
# df = pd.read_csv('D:\Workspaces\study\Python\SimpleCode-Python\CAMPAIGN_CONFIG_CACHE_EVICT.txt')
# df_unique = df.drop_duplicates()
# df_unique.reset_index(drop=True, inplace=True)
# df_unique = df_unique.drop('index', axis=1, errors='ignore')
# print(df_unique.head())
# df_unique.columns=['new topic']
# df_unique.to_excel('D:\Workspaces\study\Python\SimpleCode-Python\TopicInfo.xlsx',index=False)
newtopicInfo=pd.read_excel(r'D:\Workspaces\study\Python\SimpleCode-Python\TopicInfo.xlsx',sheet_name='Sheet1')
oldtopicInfo=pd.read_excel(r'D:\VMSMOTA\vsmsota-proj\3_Construct\Impl Plan\VSMSOTA_ImplPlan-24D.20240521.xlsx',sheet_name='Kafka')
newtopicInfo=newtopicInfo['new topic']
oldtopicInfo=oldtopicInfo['Topic Suffix']
# print(newtopicInfo.head())
# print(oldtopicInfo.head())


new=set(newtopicInfo)
old=set(oldtopicInfo)
news=new-old
# print(f"在{new}中但不在{old}中的多出数据:")
for item in news:
    print(item)